export const nodeList = [
	{
		text: '开始',
		type: 'start',
		class: 'node-start'
	},
	{
		text: '矩形',
		type: 'rect',
		class: 'node-rect'
	},
	{
		type: 'user',
		text: '用户',
		class: 'node-user'
	},
	{
		type: 'push',
		text: '推送',
		class: 'node-push'
	},
	{
		type: 'download',
		text: '位置',
		class: 'node-download'
	},
	{
		type: 'end',
		text: '结束',
		class: 'node-end'
	}
]

export const BpmnNode = [
	{
		type: 'bpmn:startEvent',
		text: '开始',
		class: 'bpmn-start'
	},
	{
		type: 'bpmn:endEvent',
		text: '结束',
		class: 'bpmn-end'
	},
	{
		type: 'bpmn:exclusiveGateway',
		text: '网关',
		class: 'bpmn-exclusiveGateway'
	},
	{
		type: 'bpmn:userTask',
		text: '用户',
		class: 'bpmn-user'
	}
]

export function configDefaultDndPanel(lf: any) {
	return [
		{
			label: '选区',
			icon: '',
			callback: () => {
				lf.extension.selectionSelect.openSelectionSelect()
				lf.once('selection:selected', () => {
					lf.extension.selectionSelect.closeSelectionSelect()
				})
			}
		},
		{
			type: 'circle',
			text: '开始',
			label: '开始节点',
			icon: ''
		},
		{
			type: 'rect',
			label: '用户任务',
			icon: '',
			className: 'important-node'
		},
		{
			logicFlowType: 'bpmn:serviceTask',
			type: 'rect',
			label: '系统任务',
			icon: '',
			// icon: '',
			className: 'import_icon'
		},
		{
			type: 'diamond',
			label: '条件判断',
			icon: ''
		},
		{
			type: 'circle',
			text: '结束',
			label: '结束节点',
			icon: ''
		}
	]
}
